Contents | Index | < Browse | Browse >

LETTERungetcULETTER Pushes a character back into a file.

Overview
#include <stdio.h>

r = ungetc(ch,f);

int r;
int ch;
FILE *f;

Portability
ANSI

Description
This function pushes the character "ch" back into the file "f". The character must be the same as the last one read; also you can max. push back one char.

Returns
The character pushed back or EOF if an error occured.

See also
getc